import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

//home文件的vuex模块引入
import home from './modules/home'
export default new Vuex.Store({
    state: {
        user: {},
        routes: []
    },
    mutations: {
        setUser(state, user) {
            state.user = user
        },
        setRouter(state, routes) {
            state.routes = routes
        }
    },
    modules: {
        home,
    }
})